package com.winmastergames.remotemonitor;

import android.app.ListActivity;
import android.os.Bundle;
import java.util.ArrayList;

public class CustomAdapterActivity extends ListActivity {

	public int numUpdates = 0;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
       super.onCreate(icicle);
       setContentView(R.layout.main);
	   ArrayList<MonitorStatus> weatherList = new ArrayList<MonitorStatus>();
	   ArrayList<RefreshTimer> timerList = new ArrayList<RefreshTimer>();
	   MonitorStatus w = new MonitorStatus( "192.168.1.1", "-1", "-1", MonitorStatus.OVERCAST );
	   RefreshTimer t = new RefreshTimer(5, w, this);
	   timerList.add( t );
	   weatherList.add( w );
	   w = new MonitorStatus( "192.168.1.2", "-1", "-1", MonitorStatus.OVERCAST );
	   t = new RefreshTimer(5, w, this);
	   timerList.add( t );
	   weatherList.add( w );
	   w = new MonitorStatus( "192.168.1.3", "-1", "-1", MonitorStatus.SUNNY );
	   t = new RefreshTimer(5, w, this);
	   timerList.add( t );
	   weatherList.add( w );
	   w = new MonitorStatus( "200.200.200.200", "-1", "-1", MonitorStatus.RAIN );
	   timerList.add( t );
	   t = new RefreshTimer(5, w, this);
	   weatherList.add( w );
       WeatherAdapter weatherAdapter = new WeatherAdapter( 
				this,
				this,
				weatherList); 
       setListAdapter( weatherAdapter );
    }
}
